package API.String.StringBuilderDemo;

public class AppendExample {
    public static void main(String[] args) {
        int[] arr = new int[]{1,2,3,4,5,6,7,8,9,0};
        StringBuilder sb = new StringBuilder();
        sb.append("[");
        for (int i = 0; i < arr.length; i++) {
            sb.append(arr[i]);
            if(i <arr.length - 1)
                sb.append(",");
        }
        sb.append("]");
        System.out.println(sb);
    }
}
